Skip to content

fix(toast): keep other overlays open when a toast appears (#DS-5407) - #1909

Open
lskramarov wants to merge 3 commits into
mainfrom
fix/DS-5407
Open

fix(toast): keep other overlays open when a toast appears (#DS-5407)#1909
lskramarov wants to merge 3 commits into
mainfrom
fix/DS-5407

Conversation

@lskramarov

Copy link
Copy Markdown
Contributor

No description provided.

The toast container is a registered CdkScrollable and faked a scroll event on
every toast animation callback. ScrollDispatcher is application-wide, so that
closed every overlay using a close-on-scroll strategy — tooltips, selects and
dropdowns inside a tab, popovers with closeOnScroll, and third-party overlays
sharing the Angular instance.

The automatic dispatch is gone. dispatchScrollEvent() stays public but
deprecated: it is now the opt-in for repositioning an overlay anchored inside a
toast when the stack shifts.
@lskramarov lskramarov self-assigned this Aug 17, 2026
Copilot AI lite review requested due to automatic review settings August 17, 2026 18:00
@lskramarov lskramarov added the bug Something isn't working label Aug 17, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the toast overlay behavior so that showing/animating a toast no longer triggers global scroll notifications that would inadvertently close other overlays (e.g., tooltips/popovers using close-on-scroll strategies).

Changes:

  • Remove the toast container’s automatic “fake scroll” dispatch on toast animation events to avoid notifying the global ScrollDispatcher.
  • Mark KbqToastContainerComponent.dispatchScrollEvent as deprecated and keep it available only for explicit callers.
  • Add regression tests and a dev-example scenario to verify that other overlays remain open when a toast appears.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tools/public_api_guard/components/toast.api.md Updates API snapshot to reflect deprecation and constructor signature changes.
packages/components/toast/toast.spec.ts Adds coverage ensuring toasts don’t trigger global scroll notifications that close unrelated overlays.
packages/components/toast/toast-container.component.ts Stops auto-dispatching scroll on toast animation; documents/deprecates the legacy scroll-dispatch callback.
packages/components-dev/toast/template.html Adds a manual repro block (tooltip/popover + toast) for DS-5407 validation.
packages/components-dev/toast/module.ts Imports tooltip/popover modules needed by the new dev template scenario.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread packages/components/toast/toast-container.component.ts Outdated
@github-actions

github-actions Bot commented Aug 17, 2026

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit e5899f9):

https://koobiq-next--prs-1909-4anf77am.web.app

(expires Thu, 20 Aug 2026 18:41:52 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: c9e37e518febda70d0317d07e8ceb35ac43c534c

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@lskramarov
lskramarov requested a review from NikGurev August 18, 2026 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants